/**
 * Created with JetBrains WebStorm.
 * User: 可乐加糖
 * Date: 13-8-5
 * Time: 下午6:54
 * To change this template use File | Settings | File Templates.
 */

var utils = require("utils"),
    EventEmitter = require("events").EventEmitter;

var Server = function(){
    console.log("init");
}

utils.inherits(Server,EventEmitter);

var s = new Server();
//定义事件
s.on('abc',function(){
    console.log('the abc event.');
})

//触发事件
s.emit('abc');